negotiator.repository
Class Repository
java.lang.Object
negotiator.repository.Repository
public class Repository
- extends java.lang.Object
Repository contains a set of known files
This can be agent files or domain+profile files.
- Author:
- Dmytro Tykhonov, W.Pasman
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Repository
public Repository()
Repository
public Repository(java.lang.String fn)
throws java.lang.Exception
- Throws:
java.lang.Exception
setFilename
public void setFilename(java.lang.String fn)
getFilename
public java.lang.String getFilename()
copyFrom
public void copyFrom(Repository rep)
load
public Repository load(java.lang.String fileName)
throws java.lang.Exception
- Throws:
java.lang.Exception
save
public void save()
getItems
public java.util.ArrayList<RepItem> getItems()
getAgentOfClass
public AgentRepItem getAgentOfClass(java.lang.String className)
removeProfileRepItem
public boolean removeProfileRepItem(ProfileRepItem item)
toString
public java.lang.String toString()
- Overrides:
toString in class java.lang.Object
getDomainByName
public static DomainRepItem getDomainByName(java.lang.String name)
throws java.lang.Exception
- Throws:
java.lang.Exception
getDomain
public Domain getDomain(DomainRepItem domainRepItem)
getDomain
public Domain getDomain(java.lang.String file)
getUtilitySpace
public UtilitySpace getUtilitySpace(Domain domain,
ProfileRepItem profile)
getUtilitySpace
public UtilitySpace getUtilitySpace(Domain domain,
java.lang.String file)
existUtilitySpace
public boolean existUtilitySpace(Domain domain,
ProfileRepItem profile)
get_domain_repos
public static Repository get_domain_repos(java.lang.String filename,
java.lang.String sourceFolder)
throws java.lang.Exception
- Uses Jax to load the
Repository.
- Throws:
java.lang.Exception
get_domain_repos
public static Repository get_domain_repos()
throws java.lang.Exception
- code that creates repos if none exists
- Throws:
java.lang.Exception
getProtocolRepository
public static Repository getProtocolRepository()
getProtocolRepository
public static Repository getProtocolRepository(java.lang.String filename,
java.lang.String sourceFolder)
throws java.lang.Exception
- Throws:
java.lang.Exception
get_agent_repository
public static Repository get_agent_repository()
get_agent_repos
public static Repository get_agent_repos(java.lang.String filename,
java.lang.String sourceFolder)
throws java.lang.Exception
- Throws:
java.lang.Exception
getItemByName
public RepItem getItemByName(java.lang.String name)